home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGSCAL
/
VPASCAL.LZH
/
MATH
< prev
next >
Wrap
Text File
|
1985-08-08
|
640b
|
25 lines
PROGRAM MATH; {some simple math calculations}
VAR
A,B : INTEGER;
OPERATOR : CHAR;
BEGIN {----------------------------------------------------------}
CLS;
WRITE('ENTER A NUMBER: ');
READLN(A);
WRITELN;
WRITE('ENTER ANOTHER: ');
READLN(B);
WRITELN;
WRITE('ENTER AN OPERATOR(+,-,*,/): ');
READLN(OPERATOR);
WRITE('A '); WRITE(OPERATOR); WRITE(' B = ');
CASE OPERATOR OF
'+' : WRITELN(A+B);
'-' : WRITELN(A-B);
'*' : WRITELN(A*B);
'/' : WRITELN(A/B);
END;{case}
END.